import request from '@/utils/request'

// 添加组织架构
export function addStructure(data) {
	return request({
		url: '/organization/add',
		method: 'post',
		data: data
	})
}

// 删除组织架构
export function delStructure(data) {
	return request({
		url: '/organization/del',
		method: 'post',
		data: data
	})
}

// 通过主键查询组织架构内容
export function getStructureByKey(params) {
	return request({
		url: '/organization/getByKey/noAuth',
		method: 'get',
		params: params
	})
}

// 分页查询
export function getStructurePage(params) {
	return request({
		url: '/organization/getPage/noAuth',
		method: 'get',
		params: params
	})
}

// 上传图片
export function uploadRichImgApi(data) {
	return request({
		url: '/organization/addPhotoImg',
		method: 'post',
		data: data,
		headers: {
			"Content-Type": "multipart/form-data"
		}
	})
}


// 修改
export function updStructure(data) {
	return request({
		url: '/organization/upd',
		method: 'post',
		data: data
	})
}
